﻿@using Models;
@model IEnumerable<Stock>
@{
    ViewBag.Title = "库存查询";
}
@(Html.Telerik().Grid<StockView>().Name("Stock").DataBinding(databinding => databinding.Ajax().Select("AjaxStockIndex", "Stock"))
                .DataKeys(keys =>
                {
                    keys.Add(s => s.ID);
                })
                .Columns(c =>
                {
                    c.Bound(s => s.StockName).Width(150);
                    c.Bound(s => s.CategoryName).Width(150);
                    c.Bound(s => s.QualityName).Width(100);
                    c.Bound(s => s.Volume).Width(100);
                    c.Bound(s => s.AreaName).Width(150);
                    c.Bound(s => s.WarehouseName).Width(150);
                })
                .Resizable(resizing => resizing.Columns(true))
                .Groupable()
                .Pageable(p=>p.PageSize(20))
                .Sortable()
                .Filterable()
                .Scrollable(scrolling => scrolling.Height(350))
)
